Page({

  /**
   * 页面的初始数据
   */
  data: {
    msg : "i am the data at first!",
    theData : "dldldld",
    myPage : null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(this.data)
    this.data = "no onLoad changed it"
    var app = getApp();
    console.log( app.globalData.msg);
    app.globalData.msg = 'i can also change the globaldata';
    console.log(app.globalData.msg);
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  bindAddCard:function() {
    wx.navigateTo({
      url: 'pages/addInfo/addInfo?id=1',
    })
  },
  onReady: function () {
    console.log(this.data)
    const ans = this.onShareAppMessage
    console.log(ans)
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    console.log("i am showing")
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    console.log("you are bad man,you hide me")
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    console.log("why are you do that")
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    console.log("i am pulling")
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    console.log("i see you want to share")
  },
  binTap:function() {
    console.log("why are you click me?")
  },
  outMyPage:function() {
    this.setData({myPage:this.route});
    console.log(this.data.myPage);  
  }

})